﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Istrib.Sound;
using Istrib.Sound.Formats;

namespace TheVoiceOfSnake
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                mp3SoundCapture.CaptureDevice = SoundCaptureDevice.Default;
                mp3SoundCapture.NormalizeVolume = false;

                mp3SoundCapture.OutputType = Mp3SoundCapture.Outputs.Wav;

                mp3SoundCapture.WaveFormat = PcmSoundFormat.Pcm8kHz8bitMono;
                //mp3SoundCapture.Mp3BitRate = (Mp3BitRate)bitRateCmb.SelectedItem;
                mp3SoundCapture.WaitOnStop = true;
                mp3SoundCapture.Start("hurrr.wav");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Not so easy...", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }
    }
}
